package com.wms.controller;

import com.wms.pojo.City;
import com.wms.pojo.Result;
import com.wms.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/city")
public class CityController {
    @Autowired
    private CityService cityService;

    @GetMapping
    public Result getAllCity(){
        List<City> list = cityService.getAllCity();
        return Result.success(list);
    }
}
